Add unit tests for PrepayCreditsSnapshot#301
Open
marcoagonzales007 wants to merge 1 commit into
Open
Conversation
QuanMPhm
requested changes
Jun 4, 2026
| == "Invoices/2025-01/Archive/NERC_Prepaid_Group-Credits-2025-01 2025-01-01T00:00:00.csv" | ||
| ) | ||
|
|
||
| def test_prepare(self): |
Contributor
There was a problem hiding this comment.
I would just omit this test, and edit test_get_credit_snapshot() so that it calls _prepare(). This test doesn't really test anything new that the current tests doesn't
QuanMPhm
approved these changes
Jun 11, 2026
Contributor
|
@knikolla @naved001 This looks good to me @marcoagonzales007 Make sure to squash your commits in this PR and update the commit message |
Part of CCI-MOC#185 Adds unit tests for PrepayCreditsSnapshot bringing the coverage from 85% to 100%. Tests added: - test_output_path: verifies the output filename is correctly formatted - test_output_s3_key: verifies the S3 path is correctly formatted - test_output_s3_archive_key: verifies the S3 archive path is correctly formatted - test_get_credit_snapshot: verifies that prepare correctly filters credits to only managed groups for the invoice month
fcdfe47 to
8bcfa64
Compare
naved001
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #185
Adds unit tests for PrepayCreditsSnapshot bringing the coverage from 85% to 100%.
Tests added:
test_output_path— verifies the output filename is correctly formattedtest_output_s3_key— verifies the S3 path is correctly formattedtest_output_s3_archive_key— verifies the S3 archive path is correctly formattedtest_prepare— verifies thatpreparecorrectly filters credits to only managed groups for the invoice month